import { Connection } from "../Core/Connection";

export class Player {

    connection: Connection
    id: number
    nickName: string
    rid: number = 0
    /** 是否准备 */
    ready: number = 0
    /** 是否正在游戏 */
    isGaming: boolean = false
    /** 是否在线 */
    isOnline: boolean
    /** 准备接受断线重连数据 */
    readyJoiningMidGame: boolean = false
    constructor({ id, connection, nickName }: Pick<Player, 'id' | 'connection' | 'nickName'>) {
        this.id = id
        this.nickName = nickName
        this.connection = connection
        this.isOnline = true
    }

}